<?php
/**
 * The browse view file of group module of ZenTaoPMS.
 *
 * @copyright   Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Chunsheng Wang <chunsheng@cnezsoft.com>
 * @package     group
 * @version     $Id: browse.html.php 4769 2013-05-05 07:24:21Z wwccss $
 * @link        http://www.zentao.net
 */
?>
<?php include '../../common/view/header.html.php';?>
<style>
    #mainContent {
        width: 800px;
    }
    .table,
    .table th,
    .table td {
        word-wrap:break-word;
        word-break:break-all;
    }
    .table a {
        color: #0c60e1;
    }
    .panel .table:first-child caption {
        border-top: 1px solid #CCCCCC;
    }
    .table caption {
        margin-bottom: 0;
        border-left: 1px solid #CCCCCC;
        border-right: 1px solid #CCCCCC;
        border-top: 1px solid #CCCCCC;
    }
    .w-165px {
        width: 165px !important;
    }
</style>
<script>

</script>
<div id='mainContent' class='main-row'>
    <div class='main-col'>
    <?php if(empty($approval)):?>
        <div class="cell">
            <div class="table-empty-tip">
                <p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
            </div>
        </div>
    <?php else:?>
        <div class='cell'>
            <div class='panel'>
                <div class="panel-heading">
                    <div class="panel-title"><?php echo $title . ' 编号：[' . $approval->code . ']';?></div>
                    <?php
                    $checkObject = new stdclass();
                    $checkObject->project = 0;
                    ?>
                    <nav class="panel-actions btn-toolbar">
                        <?php echo html::a($this->createLink('approval', 'browse'), "<i class='icon icon-back icon-sm'></i>" . $lang->goback, '', "class='btn btn-link'"); ?>
                        <?php if(common::hasPriv('approval', 'edit', $checkObject) && !empty($approval->code)) common::printLink('approval', "edit","code=$approval->code", "编辑", '', "class='btn btn-primary iframe' data-width='900' style='margin-right:10px;'",true,true); ?>
                        <?php if(common::hasPriv('approval', 'export', $checkObject)) echo html::submitButton($lang->approval->export, '', 'btn btn-primary');?>
                    </nav>
                </div>
                <div data-ride='panel-body'>
                    <table class="table table-bordered table-statistic ">
                        <caption>基本信息</caption>
                        <tr>
                            <th><?php echo $lang->approval->project; ?></th>
                            <td colspan="3"><?php echo $approval->project ;?></td>
                        </tr>
                        <tr>
                            <th class="w-165px"><?php echo $lang->approval->leader; ?></th>
                            <td><?php echo $users[$approval->leader] ;?></td>
                            <th class="w-165px"><?php echo $lang->approval->apply; ?></th>
                            <td><?php echo $approval->apply; ?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->begin; ?></th>
                            <td><?php echo $approval->begin ;?></td>
                            <th><?php echo $lang->approval->end; ?></th>
                            <td><?php echo $approval->end ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->leaderGroup; ?></th>
                            <td><?php echo mb_substr(($depts[$approval->leaderGroup]),1,mb_strlen(($depts[$approval->leaderGroup])),'utf-8') ;?></td>
                            <th><?php echo $lang->approval->counterpart; ?></th>
                            <td><?php echo $approval->counterpart ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->budget; ?></th>
                            <td><?php echo ($approval->budget) ;?></td>
                            <th><?php echo $lang->approval->number; ?></th>
                            <td><?php echo $approval->number .' 人' ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->remarks; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->remarks) ;?></td>
                        </tr>
                    </table>
                    <table class="table table-bordered table-statistic ">
                        <caption>项目背景及研发内容</caption>
                        <tr>
                            <th class="w-165px"><?php echo $lang->approval->project; ?></th>
                            <td colspan="3"><?php echo $approval->project ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->marketDemand; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->marketDemand,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->content; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->content,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->indicators; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->indicators,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->difficulties; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->difficulties,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->opponent; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->opponent,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                    </table>
                    <table class="table table-bordered table-statistic ">
                        <caption>评审依据</caption>
                        <tr>
                            <th class="w-165px"><?php echo $lang->approval->project; ?></th>
                            <td colspan="3"><?php echo $approval->project ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->strategic; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->strategic,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->feasibility; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->feasibility,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->market; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->market,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->strategy; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->strategy,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->productionConditions; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->productionConditions,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->resourceAllocation; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->resourceAllocation,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                        <tr>
                            <th><?php echo $lang->approval->competitiveAdvantage; ?></th>
                            <td colspan="3"><?php echo html_entity_decode($approval->competitiveAdvantage,ENT_QUOTES, 'UTF-8') ;?></td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    <?php endif;?>
    </div>
</div>
<a href="javascript:scroll(0,0)" style="background-color:#ffffff; padding: 5px; position: fixed; right: 10px; bottom: 80px;">至顶</a>
<a href="javascript:scroll(0,document.documentElement.clientHeight)" style="background-color:#ffffff; padding: 5px; position: fixed; right: 10px; bottom: 50px;">至底</a>
<script>
    $('#submit').on('click',function () {
        var code = "<?php echo $approval->code; ?>";

        var link = createLink('approval', 'export', 'code=' + code);
        location.href = link;
    });
</script>
<?php include '../../common/view/footer.html.php';?>
